package com.binance.assetservice.web.service;

import com.binance.assetservice.data.models.UserAssetItem;
import com.binance.assetservice.data.models.UserAssetLogItem;

import java.math.BigDecimal;
import java.util.Date;
import java.util.function.Consumer;

public interface IUserAssetLogService {

    public static final String BEAN_ID = "asset.service.UserAssetLogService";

    public void addAssetLog(Long tranId, Integer type, String asset, String userId, BigDecimal assetDelta,
            String assetInfo, UserAssetItem userAsset);

    public void addAssetLog(Consumer<UserAssetLogItem> consumer);

    /**
     * 查询指定时间点的持仓
     * @param userId
     * @param asset
     * @param endTime
     * @return
     */
    BigDecimal getAssetAmountByTime(Long userId, String asset, Date endTime);
}
